home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
doors_2
/
tw2_1110.zip
/
EDTEXT.ZIP
/
EDTEXT.DOC
next >
Wrap
Text File
|
1990-06-29
|
5KB
|
148 lines
EdText.Doc -- TradeWars text editor
I'll try to make this document short and simple.
Filenames.. Who/Where/What/Why/How.. etc.
-----------------------------------------
Included in the TW package are 2 files which contain the text used
by Tradewars. They are TW2TEXT.DAT and TWMTEXT.DAT. The first is used
by TW2.EXE, the second by TWMAINT.EXE. These files are in plain text
format, and cannot be used by the EXE files in that form. So, your job
is to edit those two files, and then tell EDTEXT to 'compile' the files.
You will be asked for a filename. If you are editing TW2TEXT.DAT, then
you will enter TW2.ENG. If you are editing TWMTEXT.DAT then you will
enter TWMAINT.ENG.
You may use a different extension if you wish. For instance, you may
enter 'FRE' for a french version, or 'SPA' for a spanish version.
If you are using a different language you may change the default from
ENG to whatever using the editor (main options). If you changed it to
FRE, then TW will look for TW2.FRE as the default.
PCBoard users, if the PCBOARD.SYS file has an extension in it, TW will
use that extension for the text file. So make sure it exists!
Keys used by EdText
-------------------
Active keys in Edtext are:
Insert -- Toggles insert mode
Alt-C -- Compile text. You will be prompted for a filename.
Alt-F -- Find a string in the text file
Alt-L -- Load a text file.
Alt-S -- Save text file.
How text is formatted:
----------------------
First and foremost, each line will be contained by opening and closing
quotes. The FIRST and LAST quotes will be stripped off when you Compile
the text using Alt-C.
Most text can be simply translated into the other language straight across
but some cannot. Some text will have special chars like: '%s' or '%d'
embedded in them. They mean:
'%s' -- put a string in here
'%d' -- put an integer here
'%u' -- put an unsigned integer here
'%ld' -- put a long integer here
'%c' -- put a single character here
'%f' -- put a floating point number here.
some of these will have 'precision' numbers in them like so: '%14ld'
in most every single case you will NOT change these! You will change the
text surrounding these sequences. So if you find a string that looks like
this:
" %d %s%s %u"
You will not need to change string like that.
TW will be VERY limited as to the translations. For instance Y or N for
YES or NO, will always have to be Y or N so don't change them, just
change the sentence preceding the Y or N.
If you have a string that looks like:
"We have %u fighters"
TW will put the correct number in the place of the '%u'.
You will see things like:
"We are %sing %d units."
When the user sees it, it will look like:
"We are Buying 65 units."
the '%s' was changed to 'Buy' and the '%d' was changed to '65'
The order of the '%x' variables must always remain the same!
The number of the '%x' variables must always remain the same!
I think what I'm trying to say is this: The verbs and nouns must be in
the same order as they would in English. Lets say you were gonna
translate the above string, you couldn't change it to:
"%d units, we are %sing." or "65 units, we are Buying"
If the '%s' precedes the '%d' in the english string, then the '%s' MUST
precede the '%d' in the new string.
Admittedly, this may not work in many cases. Its up to the translator.
The best thing to do is experiment, to get the best results. TW
has a lot of text, so it may take a while.. but it should be worth it.
As translations come in, I will add them to the released product.
Other special characters you will see:
--------------------------------------
In TWMTEXT.DAT you will see lots of backslash characters ( \ ). These
signal special sequences starting with the next char. For instance,
if you see:
'\n' those two chars will be replaced by one newline character (ASCII 10)
others you will see:
'\r' this will be replaced by one carriage return char (ASCII 13)
'\"' this will be replaced by a single double quote ( " )
These are necessary for proper text formatting on the screen.
Also you will see:
'\x1B[3n;4nm' (where 'n' is a number between 1 and 7)
This is an ANSI escape sequence, usually used to change screen colors.
The '\x1B' will be change into a single ESCape character (ASCII 27)
In this way you can eliminate, or change colors of the TWMaint screens.
Other items:
------------
EdText can also be used by anyone, just to change the flavor of their
TradeWars game. To give it that 'personal' touch. In other words, it
isn't just for other languages.
Of course, I don't want anyone changing my ZIP files, and distributing
a bunch of personalized TW2's.. but if you like, you can ZIP up your
personal changes and distribute the separately for other SysOps to use
if you like. For instance, ZIP up your modified TW2TEXT.DAT and
TWMTEXT.DAT and let other people take a look.
Thats all for now.. EdText is a VERY primitive text editor, designed
for this function only! It will not allow you to add or subtract lines
it will only allow you to modify the lines already in the text files.
It works the way it does to protect you from making something TW can't
handle.
John Morris - TradeWars Software